home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / QuickTimeVR.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  29.5 KB  |  980 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        QuickTimeVR.h
  3.  
  4.      Contains:    QuickTime VR interfaces
  5.  
  6.      Version:    Technology:    QuickTime VR 2.0.1
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __QUICKTIMEVR__
  19. #define __QUICKTIMEVR__
  20.  
  21. #ifndef __CONDITIONALMACROS__
  22. #include <ConditionalMacros.h>
  23. #endif
  24. #ifndef __DIALOGS__
  25. #include <Dialogs.h>
  26. #endif
  27. #ifndef __MOVIES__
  28. #include <Movies.h>
  29. #endif
  30.  
  31.  
  32.  
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_STRUCT_ALIGN
  46.     #pragma options align=mac68k
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48.     #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50.     #pragma pack(2)
  51. #endif
  52.  
  53. typedef struct OpaqueQTVRInstance*         QTVRInstance;
  54.  
  55. /* Released API Version numbers */
  56. #define kQTVRAPIMajorVersion02  (0x02)
  57. #define kQTVRAPIMinorVersion00  (0x00)
  58. #define kQTVRAPIMinorVersion01  (0x01)
  59.  
  60. /* Version numbers for the API described in this header */
  61. #define kQTVRAPIMajorVersion kQTVRAPIMajorVersion02
  62. #define kQTVRAPIMinorVersion kQTVRAPIMinorVersion01
  63.  
  64.  
  65.  
  66. enum {
  67.     kQTVRControllerSubType        = FOUR_CHAR_CODE('ctyp'),
  68.     kQTVRQTVRType                = FOUR_CHAR_CODE('qtvr'),
  69.     kQTVRPanoramaType            = FOUR_CHAR_CODE('pano'),
  70.     kQTVRObjectType                = FOUR_CHAR_CODE('obje'),
  71.     kQTVROldPanoType            = FOUR_CHAR_CODE('STpn'),        /* Used in QTVR 1.0 release*/
  72.     kQTVROldObjectType            = FOUR_CHAR_CODE('stna')        /* Used in QTVR 1.0 release*/
  73. };
  74.  
  75. #if TARGET_OS_MAC
  76. #define kQTVRUnknownType '????'        // Unknown node type
  77. #else
  78. #define kQTVRUnknownType '\?\?\?\?'    // Unknown node type
  79. #endif  /* TARGET_OS_MAC */
  80.  
  81. /* QTVR hot spot types*/
  82.  
  83. enum {
  84.     kQTVRHotSpotLinkType        = FOUR_CHAR_CODE('link'),
  85.     kQTVRHotSpotURLType            = FOUR_CHAR_CODE('url '),
  86.     kQTVRHotSpotUndefinedType    = FOUR_CHAR_CODE('undf')
  87. };
  88.  
  89. /* Special Values for nodeID in QTVRGoToNodeID*/
  90.  
  91. enum {
  92.     kQTVRCurrentNode            = 0,
  93.     kQTVRPreviousNode            = (long)0x80000000,
  94.     kQTVRDefaultNode            = (long)0x80000001
  95. };
  96.  
  97. /* Panorama correction modes used for the kQTVRImagingCorrection imaging property*/
  98.  
  99. enum {
  100.     kQTVRNoCorrection            = 0,
  101.     kQTVRPartialCorrection        = 1,
  102.     kQTVRFullCorrection            = 2
  103. };
  104.  
  105. /* Imaging Modes used by QTVRSetImagingProperty, QTVRGetImagingProperty, QTVRUpdate, QTVRBeginUpdate*/
  106.  
  107. enum {
  108.     kQTVRStatic                    = 1,
  109.     kQTVRMotion                    = 2,
  110.     kQTVRCurrentMode            = 0,                            /* Special Value for QTVRUpdate*/
  111.     kQTVRAllModes                = 100                            /* Special value for QTVRSetProperty*/
  112. };
  113.  
  114. typedef UInt32                             QTVRImagingMode;
  115. /* Imaging Properties used by QTVRSetImagingProperty, QTVRGetImagingProperty*/
  116.  
  117. enum {
  118.     kQTVRImagingCorrection        = 1,
  119.     kQTVRImagingQuality            = 2,
  120.     kQTVRImagingDirectDraw        = 3,
  121.     kQTVRImagingCurrentMode        = 100                            /* Get Only*/
  122. };
  123.  
  124. /* OR the above with kImagingDefaultValue to get/set the default value*/
  125.  
  126. enum {
  127.     kImagingDefaultValue        = (long)0x80000000
  128. };
  129.  
  130. /* Transition Types used by QTVRSetTransitionProperty, QTVREnableTransition*/
  131.  
  132. enum {
  133.     kQTVRTransitionSwing        = 1
  134. };
  135.  
  136. /* Transition Properties QTVRSetTransitionProperty*/
  137.  
  138. enum {
  139.     kQTVRTransitionSpeed        = 1,
  140.     kQTVRTransitionDirection    = 2
  141. };
  142.  
  143. /* Constraint values used to construct value returned by GetConstraintStatus*/
  144.  
  145. enum {
  146.     kQTVRUnconstrained            = 0,
  147.     kQTVRCantPanLeft            = 1 << 0,
  148.     kQTVRCantPanRight            = 1 << 1,
  149.     kQTVRCantPanUp                = 1 << 2,
  150.     kQTVRCantPanDown            = 1 << 3,
  151.     kQTVRCantZoomIn                = 1 << 4,
  152.     kQTVRCantZoomOut            = 1 << 5,
  153.     kQTVRCantTranslateLeft        = 1 << 6,
  154.     kQTVRCantTranslateRight        = 1 << 7,
  155.     kQTVRCantTranslateUp        = 1 << 8,
  156.     kQTVRCantTranslateDown        = 1 << 9
  157. };
  158.  
  159. /* Properties for use with QTVRSetInteractionProperty/GetInteractionProperty*/
  160.  
  161. enum {
  162.     kQTVRInteractionMouseClickHysteresis = 1,                    /* pixels within which the mouse is considered not to have moved (UInt16)*/
  163.     kQTVRInteractionMouseClickTimeout = 2,                        /* ticks after which a mouse click times out and turns into panning (UInt32)*/
  164.     kQTVRInteractionPanTiltSpeed = 3,                            /* control the relative pan/tilt speed from 1 (slowest) to 10 (fastest). (UInt32) Default is 5;*/
  165.     kQTVRInteractionZoomSpeed    = 4,                            /* control the relative zooming speed from 1 (slowest) to 10 (fastest). (UInt32) Default is 5;*/
  166.     kQTVRInteractionTranslateOnMouseDown = 101,                    /* Holding MouseDown with this setting translates zoomed object movies (Boolean)*/
  167.     kQTVRInteractionMouseMotionScale = 102                        /* The maximum angle of rotation caused by dragging across the display window. (* float)*/
  168. };
  169.  
  170. /* OR the above with kQTVRInteractionDefaultValue to get/set the default value*/
  171.  
  172. enum {
  173.     kQTVRInteractionDefaultValue = (long)0x80000000
  174. };
  175.  
  176. /* Resolution constants used in QTVRSetCachePrefs, QTVRGetCacheSettings, QTVRGetCacheMemInfo*/
  177.  
  178. enum {
  179.     kQTVRDefaultRes                = 0,
  180.     kQTVRFullRes                = 1 << 0,
  181.     kQTVRHalfRes                = 1 << 1,
  182.     kQTVRQuarterRes                = 1 << 2
  183. };
  184.  
  185. /* Cache Size Pref constants used in QTVRSetCachePrefs, QTVRGetCacheSettings*/
  186.  
  187. enum {
  188.     kQTVRMinimumCache            = -1,
  189.     kQTVRSuggestedCache            = 0,
  190.     kQTVRFullCache                = 1
  191. };
  192.  
  193. /* Pixel depth constants used in QTVRSetCachePrefs, QTVRGetCacheMemInfo*/
  194.  
  195. enum {
  196.     kQTVRUseMovieDepth            = 0,
  197.     kQTVRDepth16                = 16,
  198.     kQTVRDepth32                = 32
  199. };
  200.  
  201. /* Angular units used by QTVRSetAngularUnits*/
  202.  
  203. enum {
  204.     kQTVRDegrees                = 0,
  205.     kQTVRRadians                = 1
  206. };
  207.  
  208. typedef UInt32                             QTVRAngularUnits;
  209. /* Values for enableFlag parameter in QTVREnableHotSpot*/
  210.  
  211. enum {
  212.     kQTVRHotSpotID                = 0,
  213.     kQTVRHotSpotType            = 1,
  214.     kQTVRAllHotSpots            = 2
  215. };
  216.  
  217. /* Values for kind parameter in QTVRGet/SetConstraints, QTVRGetViewingLimits*/
  218.  
  219. enum {
  220.     kQTVRPan                    = 0,
  221.     kQTVRTilt                    = 1,
  222.     kQTVRFieldOfView            = 2,
  223.     kQTVRViewCenterH            = 4,                            /* WrapAndConstrain only*/
  224.     kQTVRViewCenterV            = 5                                /* WrapAndConstrain only*/
  225. };
  226.  
  227. /* Values for setting parameter in QTVRSetAnimationSetting, QTVRGetAnimationSetting*/
  228.  
  229. enum {
  230.     kQTVRPalindromeViewFrames    = 1,                            /* View Frame Animation Settings*/
  231.     kQTVRStartFirstViewFrame    = 2,
  232.     kQTVRDontLoopViewFrames        = 3,
  233.     kQTVRSyncViewToFrameRate    = 16,                            /* View Animation Settings*/
  234.     kQTVRPalindromeViews        = 17
  235. };
  236.  
  237. typedef UInt32                             QTVRObjectAnimationSetting;
  238.  
  239. enum {
  240.     kQTVRWrapPan                = 1,
  241.     kQTVRWrapTilt                = 2,
  242.     kQTVRCanZoom                = 3,
  243.     kQTVRReverseHControl        = 4,
  244.     kQTVRReverseVControl        = 5,
  245.     kQTVRSwapHVControl            = 6,
  246.     kQTVRTranslation            = 7
  247. };
  248.  
  249. typedef UInt32                             QTVRControlSetting;
  250.  
  251. enum {
  252.     kQTVRDefault                = 0,
  253.     kQTVRCurrent                = 2,
  254.     kQTVRMouseDown                = 3
  255. };
  256.  
  257. typedef UInt32                             QTVRViewStateType;
  258.  
  259. enum {
  260.     kQTVRRight                    = 0,
  261.     kQTVRUpRight                = 45,
  262.     kQTVRUp                        = 90,
  263.     kQTVRUpLeft                    = 135,
  264.     kQTVRLeft                    = 180,
  265.     kQTVRDownLeft                = 225,
  266.     kQTVRDown                    = 270,
  267.     kQTVRDownRight                = 315
  268. };
  269.  
  270. typedef UInt32                             QTVRNudgeControl;
  271. /* Flags to control elements of the QTVR control bar (set via mcActionSetFlags) */
  272.  
  273. enum {
  274.     mcFlagQTVRSuppressBackBtn    = 1 << 16,
  275.     mcFlagQTVRSuppressZoomBtns    = 1 << 17,
  276.     mcFlagQTVRSuppressHotSpotBtn = 1 << 18,
  277.     mcFlagQTVRSuppressTranslateBtn = 1 << 19,
  278.     mcFlagQTVRSuppressHelpText    = 1 << 20,
  279.     mcFlagQTVRSuppressHotSpotNames = 1 << 21,
  280.     mcFlagQTVRExplicitFlagSet    = 1 << 31                        /* bits 0->30 should be interpreted as "explicit on" for the corresponding suppression bits*/
  281. };
  282.  
  283. /* Cursor types used in type field of QTVRCursorRecord*/
  284.  
  285. enum {
  286.     kQTVRUseDefaultCursor        = 0,
  287.     kQTVRStdCursorType            = 1,
  288.     kQTVRColorCursorType        = 2
  289. };
  290.  
  291. /* Values for flags parameter in QTVRMouseOverHotSpot callback*/
  292.  
  293. enum {
  294.     kQTVRHotSpotEnter            = 0,
  295.     kQTVRHotSpotWithin            = 1,
  296.     kQTVRHotSpotLeave            = 2
  297. };
  298.  
  299. /* Values for flags field of areasOfInterest in QTVRSetBackBufferImagingProc*/
  300.  
  301. enum {
  302.     kQTVRBackBufferEveryUpdate    = 1 << 0,
  303.     kQTVRBackBufferEveryIdle    = 1 << 1,
  304.     kQTVRBackBufferAlwaysRefresh = 1 << 2,
  305.     kQTVRBackBufferHorizontal    = 1 << 3                        /* not supported in 2.0*/
  306. };
  307.  
  308. /* Values for flagsIn parameter in QTVRBackBufferImaging callback*/
  309.  
  310. enum {
  311.     kQTVRBackBufferRectVisible    = 1 << 0,
  312.     kQTVRBackBufferWasRefreshed    = 1 << 1
  313. };
  314.  
  315. /* Values for flagsOut parameter in QTVRBackBufferImaging callback*/
  316.  
  317. enum {
  318.     kQTVRBackBufferFlagDidDraw    = 1 << 0,
  319.     kQTVRBackBufferFlagLastFlag    = 1 << 31
  320. };
  321.  
  322. /* QTVRCursorRecord used in QTVRReplaceCursor*/
  323. struct QTVRCursorRecord {
  324.     UInt16                             theType;                    /* field was previously named "type"*/
  325.     SInt16                             rsrcID;
  326.     Handle                             handle;
  327. };
  328. typedef struct QTVRCursorRecord QTVRCursorRecord;
  329.  
  330. struct QTVRFloatPoint {
  331.     float                             x;
  332.     float                             y;
  333. };
  334. typedef struct QTVRFloatPoint QTVRFloatPoint;
  335.  
  336. /* Struct used for areasOfInterest parameter in QTVRSetBackBufferImagingProc*/
  337. struct QTVRAreaOfInterest {
  338.     float                             panAngle;
  339.     float                             tiltAngle;
  340.     float                             width;
  341.     float                             height;
  342.     UInt32                             flags;
  343. };
  344. typedef struct QTVRAreaOfInterest QTVRAreaOfInterest;
  345.  
  346. /*
  347.   =================================================================================================
  348.    Callback routines 
  349.   -------------------------------------------------------------------------------------------------
  350. */
  351.  
  352. typedef CALLBACK_API( OSErr , QTVRLeavingNodeProcPtr )(QTVRInstance qtvr, UInt32 fromNodeID, UInt32 toNodeID, Boolean *cancel, SInt32 refCon);
  353. typedef CALLBACK_API( OSErr , QTVREnteringNodeProcPtr )(QTVRInstance qtvr, UInt32 nodeID, SInt32 refCon);
  354. typedef CALLBACK_API( OSErr , QTVRMouseOverHotSpotProcPtr )(QTVRInstance qtvr, UInt32 hotSpotID, UInt32 flags, SInt32 refCon);
  355. typedef CALLBACK_API( OSErr , QTVRImagingCompleteProcPtr )(QTVRInstance qtvr, SInt32 refCon);
  356. typedef CALLBACK_API( OSErr , QTVRBackBufferImagingProcPtr )(QTVRInstance qtvr, Rect *drawRect, UInt16 areaIndex, UInt32 flagsIn, UInt32 *flagsOut, SInt32 refCon);
  357. typedef STACK_UPP_TYPE(QTVRLeavingNodeProcPtr)                     QTVRLeavingNodeUPP;
  358. typedef STACK_UPP_TYPE(QTVREnteringNodeProcPtr)                 QTVREnteringNodeUPP;
  359. typedef STACK_UPP_TYPE(QTVRMouseOverHotSpotProcPtr)             QTVRMouseOverHotSpotUPP;
  360. typedef STACK_UPP_TYPE(QTVRImagingCompleteProcPtr)                 QTVRImagingCompleteUPP;
  361. typedef STACK_UPP_TYPE(QTVRBackBufferImagingProcPtr)             QTVRBackBufferImagingUPP;
  362. enum { uppQTVRLeavingNodeProcInfo = 0x0000FFE0 };                 /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  363. enum { uppQTVREnteringNodeProcInfo = 0x00000FE0 };                 /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  364. enum { uppQTVRMouseOverHotSpotProcInfo = 0x00003FE0 };             /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  365. enum { uppQTVRImagingCompleteProcInfo = 0x000003E0 };             /* pascal 2_bytes Func(4_bytes, 4_bytes) */
  366. enum { uppQTVRBackBufferImagingProcInfo = 0x0003FBE0 };         /* pascal 2_bytes Func(4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
  367. #define NewQTVRLeavingNodeProc(userRoutine)                     (QTVRLeavingNodeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRLeavingNodeProcInfo, GetCurrentArchitecture())
  368. #define NewQTVREnteringNodeProc(userRoutine)                     (QTVREnteringNodeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVREnteringNodeProcInfo, GetCurrentArchitecture())
  369. #define NewQTVRMouseOverHotSpotProc(userRoutine)                 (QTVRMouseOverHotSpotUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRMouseOverHotSpotProcInfo, GetCurrentArchitecture())
  370. #define NewQTVRImagingCompleteProc(userRoutine)                 (QTVRImagingCompleteUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRImagingCompleteProcInfo, GetCurrentArchitecture())
  371. #define NewQTVRBackBufferImagingProc(userRoutine)                 (QTVRBackBufferImagingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRBackBufferImagingProcInfo, GetCurrentArchitecture())
  372. #define CallQTVRLeavingNodeProc(userRoutine, qtvr, fromNodeID, toNodeID, cancel, refCon)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppQTVRLeavingNodeProcInfo, (qtvr), (fromNodeID), (toNodeID), (cancel), (refCon))
  373. #define CallQTVREnteringNodeProc(userRoutine, qtvr, nodeID, refCon)  CALL_THREE_PARAMETER_UPP((userRoutine), uppQTVREnteringNodeProcInfo, (qtvr), (nodeID), (refCon))
  374. #define CallQTVRMouseOverHotSpotProc(userRoutine, qtvr, hotSpotID, flags, refCon)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQTVRMouseOverHotSpotProcInfo, (qtvr), (hotSpotID), (flags), (refCon))
  375. #define CallQTVRImagingCompleteProc(userRoutine, qtvr, refCon)     CALL_TWO_PARAMETER_UPP((userRoutine), uppQTVRImagingCompleteProcInfo, (qtvr), (refCon))
  376. #define CallQTVRBackBufferImagingProc(userRoutine, qtvr, drawRect, areaIndex, flagsIn, flagsOut, refCon)  CALL_SIX_PARAMETER_UPP((userRoutine), uppQTVRBackBufferImagingProcInfo, (qtvr), (drawRect), (areaIndex), (flagsIn), (flagsOut), (refCon))
  377. /*
  378.   =================================================================================================
  379.     QTVR Intercept Struct, Callback, Routine Descriptors 
  380.   -------------------------------------------------------------------------------------------------
  381. */
  382.  
  383.  
  384. enum {
  385.     kQTVRSetPanAngleSelector    = 0x2000,
  386.     kQTVRSetTiltAngleSelector    = 0x2001,
  387.     kQTVRSetFieldOfViewSelector    = 0x2002,
  388.     kQTVRSetViewCenterSelector    = 0x2003,
  389.     kQTVRMouseEnterSelector        = 0x2004,
  390.     kQTVRMouseWithinSelector    = 0x2005,
  391.     kQTVRMouseLeaveSelector        = 0x2006,
  392.     kQTVRMouseDownSelector        = 0x2007,
  393.     kQTVRMouseStillDownSelector    = 0x2008,
  394.     kQTVRMouseUpSelector        = 0x2009,
  395.     kQTVRTriggerHotSpotSelector    = 0x200A
  396. };
  397.  
  398. typedef UInt32                             QTVRProcSelector;
  399. struct QTVRInterceptRecord {
  400.     SInt32                             reserved1;
  401.     SInt32                             selector;
  402.  
  403.     SInt32                             reserved2;
  404.     SInt32                             reserved3;
  405.  
  406.     SInt32                             paramCount;
  407.     void *                            parameter[6];
  408. };
  409. typedef struct QTVRInterceptRecord QTVRInterceptRecord;
  410.  
  411. typedef QTVRInterceptRecord *            QTVRInterceptPtr;
  412. /* Prototype for Intercept Proc callback*/
  413. typedef CALLBACK_API( void , QTVRInterceptProcPtr )(QTVRInstance qtvr, QTVRInterceptPtr qtvrMsg, SInt32 refCon, Boolean *cancel);
  414. typedef STACK_UPP_TYPE(QTVRInterceptProcPtr)                     QTVRInterceptUPP;
  415. enum { uppQTVRInterceptProcInfo = 0x00003FC0 };                 /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  416. #define NewQTVRInterceptProc(userRoutine)                         (QTVRInterceptUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRInterceptProcInfo, GetCurrentArchitecture())
  417. #define CallQTVRInterceptProc(userRoutine, qtvr, qtvrMsg, refCon, cancel)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQTVRInterceptProcInfo, (qtvr), (qtvrMsg), (refCon), (cancel))
  418. /*
  419.   =================================================================================================
  420.     General QTVR calls 
  421.   -------------------------------------------------------------------------------------------------
  422. */
  423.  
  424. EXTERN_API_C( Track )
  425. QTVRGetQTVRTrack                (Movie                     theMovie,
  426.                                  SInt32                 index);
  427.  
  428. EXTERN_API_C( OSErr )
  429. QTVRGetQTVRInstance                (QTVRInstance *            qtvr,
  430.                                  Track                     qtvrTrack,
  431.                                  MovieController         mc);
  432.  
  433. /*
  434.   =================================================================================================
  435.     Viewing Angles and Zooming 
  436.   -------------------------------------------------------------------------------------------------
  437. */
  438.  
  439. EXTERN_API_C( OSErr )
  440. QTVRSetPanAngle                    (QTVRInstance             qtvr,
  441.                                  float                     panAngle);
  442.  
  443. EXTERN_API_C( float )
  444. QTVRGetPanAngle                    (QTVRInstance             qtvr);
  445.  
  446. EXTERN_API_C( OSErr )
  447. QTVRSetTiltAngle                (QTVRInstance             qtvr,
  448.                                  float                     tiltAngle);
  449.  
  450. EXTERN_API_C( float )
  451. QTVRGetTiltAngle                (QTVRInstance             qtvr);
  452.  
  453. EXTERN_API_C( OSErr )
  454. QTVRSetFieldOfView                (QTVRInstance             qtvr,
  455.                                  float                     fieldOfView);
  456.  
  457. EXTERN_API_C( float )
  458. QTVRGetFieldOfView                (QTVRInstance             qtvr);
  459.  
  460. EXTERN_API_C( OSErr )
  461. QTVRShowDefaultView                (QTVRInstance             qtvr);
  462.  
  463. /* Object Specific*/
  464. EXTERN_API_C( OSErr )
  465. QTVRSetViewCenter                (QTVRInstance             qtvr,
  466.                                  const QTVRFloatPoint *    viewCenter);
  467.  
  468. EXTERN_API_C( OSErr )
  469. QTVRGetViewCenter                (QTVRInstance             qtvr,
  470.                                  QTVRFloatPoint *        viewCenter);
  471.  
  472. EXTERN_API_C( OSErr )
  473. QTVRNudge                        (QTVRInstance             qtvr,
  474.                                  QTVRNudgeControl         direction);
  475.  
  476. /*
  477.   =================================================================================================
  478.     Scene and Node Location Information 
  479.   -------------------------------------------------------------------------------------------------
  480. */
  481.  
  482. EXTERN_API_C( OSErr )
  483. QTVRGetVRWorld                    (QTVRInstance             qtvr,
  484.                                  QTAtomContainer *        VRWorld);
  485.  
  486. EXTERN_API_C( OSErr )
  487. QTVRGoToNodeID                    (QTVRInstance             qtvr,
  488.                                  UInt32                 nodeID);
  489.  
  490. EXTERN_API_C( UInt32 )
  491. QTVRGetCurrentNodeID            (QTVRInstance             qtvr);
  492.  
  493. EXTERN_API_C( OSType )
  494. QTVRGetNodeType                    (QTVRInstance             qtvr,
  495.                                  UInt32                 nodeID);
  496.  
  497. /*
  498.   =================================================================================================
  499.     Hot Spot related calls 
  500.   -------------------------------------------------------------------------------------------------
  501. */
  502.  
  503. EXTERN_API_C( OSErr )
  504. QTVRPtToHotSpotID                (QTVRInstance             qtvr,
  505.                                  Point                     pt,
  506.                                  UInt32 *                hotSpotID);
  507.  
  508. EXTERN_API_C( OSErr )
  509. QTVRGetNodeInfo                    (QTVRInstance             qtvr,
  510.                                  UInt32                 nodeID,
  511.                                  QTAtomContainer *        nodeInfo);
  512.  
  513. EXTERN_API_C( OSErr )
  514. QTVRTriggerHotSpot                (QTVRInstance             qtvr,
  515.                                  UInt32                 hotSpotID,
  516.                                  QTAtomContainer         nodeInfo,
  517.                                  QTAtom                 selectedAtom);
  518.  
  519. EXTERN_API_C( OSErr )
  520. QTVRSetMouseOverHotSpotProc        (QTVRInstance             qtvr,
  521.                                  QTVRMouseOverHotSpotUPP  mouseOverHotSpotProc,
  522.                                  SInt32                 refCon,
  523.                                  UInt32                 flags);
  524.  
  525. EXTERN_API_C( OSErr )
  526. QTVREnableHotSpot                (QTVRInstance             qtvr,
  527.                                  UInt32                 enableFlag,
  528.                                  UInt32                 hotSpotValue,
  529.                                  Boolean                 enable);
  530.  
  531. EXTERN_API_C( UInt32 )
  532. QTVRGetVisibleHotSpots            (QTVRInstance             qtvr,
  533.                                  Handle                 hotSpots);
  534.  
  535. EXTERN_API_C( OSErr )
  536. QTVRGetHotSpotRegion            (QTVRInstance             qtvr,
  537.                                  UInt32                 hotSpotID,
  538.                                  RgnHandle                 hotSpotRegion);
  539.  
  540. /*
  541.   =================================================================================================
  542.     Event & Cursor Handling Calls 
  543.   -------------------------------------------------------------------------------------------------
  544. */
  545.  
  546. EXTERN_API_C( OSErr )
  547. QTVRSetMouseOverTracking        (QTVRInstance             qtvr,
  548.                                  Boolean                 enable);
  549.  
  550. EXTERN_API_C( Boolean )
  551. QTVRGetMouseOverTracking        (QTVRInstance             qtvr);
  552.  
  553. EXTERN_API_C( OSErr )
  554. QTVRSetMouseDownTracking        (QTVRInstance             qtvr,
  555.                                  Boolean                 enable);
  556.  
  557. EXTERN_API_C( Boolean )
  558. QTVRGetMouseDownTracking        (QTVRInstance             qtvr);
  559.  
  560. EXTERN_API_C( OSErr )
  561. QTVRMouseEnter                    (QTVRInstance             qtvr,
  562.                                  Point                     pt,
  563.                                  UInt32 *                hotSpotID,
  564.                                  WindowPtr                 w);
  565.  
  566. EXTERN_API_C( OSErr )
  567. QTVRMouseWithin                    (QTVRInstance             qtvr,
  568.                                  Point                     pt,
  569.                                  UInt32 *                hotSpotID,
  570.                                  WindowPtr                 w);
  571.  
  572. EXTERN_API_C( OSErr )
  573. QTVRMouseLeave                    (QTVRInstance             qtvr,
  574.                                  Point                     pt,
  575.                                  WindowPtr                 w);
  576.  
  577. EXTERN_API_C( OSErr )
  578. QTVRMouseDown                    (QTVRInstance             qtvr,
  579.                                  Point                     pt,
  580.                                  UInt32                 when,
  581.                                  UInt16                 modifiers,
  582.                                  UInt32 *                hotSpotID,
  583.                                  WindowPtr                 w);
  584.  
  585. EXTERN_API_C( OSErr )
  586. QTVRMouseStillDown                (QTVRInstance             qtvr,
  587.                                  Point                     pt,
  588.                                  UInt32 *                hotSpotID,
  589.                                  WindowPtr                 w);
  590.  
  591. EXTERN_API_C( OSErr )
  592. QTVRMouseUp                        (QTVRInstance             qtvr,
  593.                                  Point                     pt,
  594.                                  UInt32 *                hotSpotID,
  595.                                  WindowPtr                 w);
  596.  
  597. /* These require kQTVRAPIMajorVersion02 and kQTVRAPIMinorVersion01*/
  598. EXTERN_API_C( OSErr )
  599. QTVRMouseStillDownExtended        (QTVRInstance             qtvr,
  600.                                  Point                     pt,
  601.                                  UInt32 *                hotSpotID,
  602.                                  WindowPtr                 w,
  603.                                  UInt32                 when,
  604.                                  UInt16                 modifiers);
  605.  
  606. EXTERN_API_C( OSErr )
  607. QTVRMouseUpExtended                (QTVRInstance             qtvr,
  608.                                  Point                     pt,
  609.                                  UInt32 *                hotSpotID,
  610.                                  WindowPtr                 w,
  611.                                  UInt32                 when,
  612.                                  UInt16                 modifiers);
  613.  
  614. /*
  615.   =================================================================================================
  616.     Intercept Routines 
  617.   -------------------------------------------------------------------------------------------------
  618. */
  619.  
  620. EXTERN_API_C( OSErr )
  621. QTVRInstallInterceptProc        (QTVRInstance             qtvr,
  622.                                  QTVRProcSelector         selector,
  623.                                  QTVRInterceptUPP         interceptProc,
  624.                                  SInt32                 refCon,
  625.                                  UInt32                 flags);
  626.  
  627. EXTERN_API_C( OSErr )
  628. QTVRCallInterceptedProc            (QTVRInstance             qtvr,
  629.                                  QTVRInterceptRecord *    qtvrMsg);
  630.  
  631. /*
  632.   =================================================================================================
  633.     Object Movie Specific Calls 
  634.   -------------------------------------------------------------------------------------------------
  635. */
  636.  
  637. EXTERN_API_C( OSErr )
  638. QTVRSetFrameRate                (QTVRInstance             qtvr,
  639.                                  float                     rate);
  640.  
  641. EXTERN_API_C( float )
  642. QTVRGetFrameRate                (QTVRInstance             qtvr);
  643.  
  644. EXTERN_API_C( OSErr )
  645. QTVRSetViewRate                    (QTVRInstance             qtvr,
  646.                                  float                     rate);
  647.  
  648. EXTERN_API_C( float )
  649. QTVRGetViewRate                    (QTVRInstance             qtvr);
  650.  
  651. EXTERN_API_C( OSErr )
  652. QTVRSetViewCurrentTime            (QTVRInstance             qtvr,
  653.                                  TimeValue                 time);
  654.  
  655. EXTERN_API_C( TimeValue )
  656. QTVRGetViewCurrentTime            (QTVRInstance             qtvr);
  657.  
  658. EXTERN_API_C( TimeValue )
  659. QTVRGetCurrentViewDuration        (QTVRInstance             qtvr);
  660.  
  661. /*
  662.   =================================================================================================
  663.    View State Calls - QTVR Object Only
  664.   -------------------------------------------------------------------------------------------------
  665. */
  666.  
  667. EXTERN_API_C( OSErr )
  668. QTVRSetViewState                (QTVRInstance             qtvr,
  669.                                  QTVRViewStateType         viewStateType,
  670.                                  UInt16                 state);
  671.  
  672. EXTERN_API_C( OSErr )
  673. QTVRGetViewState                (QTVRInstance             qtvr,
  674.                                  QTVRViewStateType         viewStateType,
  675.                                  UInt16 *                state);
  676.  
  677. EXTERN_API_C( UInt16 )
  678. QTVRGetViewStateCount            (QTVRInstance             qtvr);
  679.  
  680. EXTERN_API_C( OSErr )
  681. QTVRSetAnimationSetting            (QTVRInstance             qtvr,
  682.                                  QTVRObjectAnimationSetting  setting,
  683.                                  Boolean                 enable);
  684.  
  685. EXTERN_API_C( OSErr )
  686. QTVRGetAnimationSetting            (QTVRInstance             qtvr,
  687.                                  QTVRObjectAnimationSetting  setting,
  688.                                  Boolean *                enable);
  689.  
  690. EXTERN_API_C( OSErr )
  691. QTVRSetControlSetting            (QTVRInstance             qtvr,
  692.                                  QTVRControlSetting     setting,
  693.                                  Boolean                 enable);
  694.  
  695. EXTERN_API_C( OSErr )
  696. QTVRGetControlSetting            (QTVRInstance             qtvr,
  697.                                  QTVRControlSetting     setting,
  698.                                  Boolean *                enable);
  699.  
  700. EXTERN_API_C( OSErr )
  701. QTVREnableFrameAnimation        (QTVRInstance             qtvr,
  702.                                  Boolean                 enable);
  703.  
  704. EXTERN_API_C( Boolean )
  705. QTVRGetFrameAnimation            (QTVRInstance             qtvr);
  706.  
  707. EXTERN_API_C( OSErr )
  708. QTVREnableViewAnimation            (QTVRInstance             qtvr,
  709.                                  Boolean                 enable);
  710.  
  711. EXTERN_API_C( Boolean )
  712. QTVRGetViewAnimation            (QTVRInstance             qtvr);
  713.  
  714.  
  715. /*
  716.   =================================================================================================
  717.     Imaging Characteristics 
  718.   -------------------------------------------------------------------------------------------------
  719. */
  720.  
  721. EXTERN_API_C( OSErr )
  722. QTVRSetVisible                    (QTVRInstance             qtvr,
  723.                                  Boolean                 visible);
  724.  
  725. EXTERN_API_C( Boolean )
  726. QTVRGetVisible                    (QTVRInstance             qtvr);
  727.  
  728. EXTERN_API_C( OSErr )
  729. QTVRSetImagingProperty            (QTVRInstance             qtvr,
  730.                                  QTVRImagingMode         imagingMode,
  731.                                  UInt32                 imagingProperty,
  732.                                  SInt32                 propertyValue);
  733.  
  734. EXTERN_API_C( OSErr )
  735. QTVRGetImagingProperty            (QTVRInstance             qtvr,
  736.                                  QTVRImagingMode         imagingMode,
  737.                                  UInt32                 imagingProperty,
  738.                                  SInt32 *                propertyValue);
  739.  
  740. EXTERN_API_C( OSErr )
  741. QTVRUpdate                        (QTVRInstance             qtvr,
  742.                                  QTVRImagingMode         imagingMode);
  743.  
  744. EXTERN_API_C( OSErr )
  745. QTVRBeginUpdateStream            (QTVRInstance             qtvr,
  746.                                  QTVRImagingMode         imagingMode);
  747.  
  748. EXTERN_API_C( OSErr )
  749. QTVREndUpdateStream                (QTVRInstance             qtvr);
  750.  
  751. EXTERN_API_C( OSErr )
  752. QTVRSetTransitionProperty        (QTVRInstance             qtvr,
  753.                                  UInt32                 transitionType,
  754.                                  UInt32                 transitionProperty,
  755.                                  SInt32                 transitionValue);
  756.  
  757. EXTERN_API_C( OSErr )
  758. QTVREnableTransition            (QTVRInstance             qtvr,
  759.                                  UInt32                 transitionType,
  760.                                  Boolean                 enable);
  761.  
  762. /*
  763.   =================================================================================================
  764.     Basic Conversion and Math Routines 
  765.   -------------------------------------------------------------------------------------------------
  766. */
  767.  
  768. EXTERN_API_C( OSErr )
  769. QTVRSetAngularUnits                (QTVRInstance             qtvr,
  770.                                  QTVRAngularUnits         units);
  771.  
  772. EXTERN_API_C( QTVRAngularUnits )
  773. QTVRGetAngularUnits                (QTVRInstance             qtvr);
  774.  
  775. /* Pano specific routines*/
  776. EXTERN_API_C( OSErr )
  777. QTVRPtToAngles                    (QTVRInstance             qtvr,
  778.                                  Point                     pt,
  779.                                  float *                panAngle,
  780.                                  float *                tiltAngle);
  781.  
  782. EXTERN_API_C( OSErr )
  783. QTVRCoordToAngles                (QTVRInstance             qtvr,
  784.                                  QTVRFloatPoint *        coord,
  785.                                  float *                panAngle,
  786.                                  float *                tiltAngle);
  787.  
  788. EXTERN_API_C( OSErr )
  789. QTVRAnglesToCoord                (QTVRInstance             qtvr,
  790.                                  float                     panAngle,
  791.                                  float                     tiltAngle,
  792.                                  QTVRFloatPoint *        coord);
  793.  
  794. /* Object specific routines*/
  795. EXTERN_API_C( short )
  796. QTVRPanToColumn                    (QTVRInstance             qtvr,
  797.                                  float                     panAngle);
  798.  
  799. /* zero based    */
  800. EXTERN_API_C( float )
  801. QTVRColumnToPan                    (QTVRInstance             qtvr,
  802.                                  short                     column);
  803.  
  804. /* zero based    */
  805. EXTERN_API_C( short )
  806. QTVRTiltToRow                    (QTVRInstance             qtvr,
  807.                                  float                     tiltAngle);
  808.  
  809. /* zero based    */
  810. EXTERN_API_C( float )
  811. QTVRRowToTilt                    (QTVRInstance             qtvr,
  812.                                  short                     row);
  813.  
  814. /* zero based                */
  815. EXTERN_API_C( OSErr )
  816. QTVRWrapAndConstrain            (QTVRInstance             qtvr,
  817.                                  short                     kind,
  818.                                  float                     value,
  819.                                  float *                result);
  820.  
  821.  
  822. /*
  823.   =================================================================================================
  824.     Interaction Routines 
  825.   -------------------------------------------------------------------------------------------------
  826. */
  827.  
  828. EXTERN_API_C( OSErr )
  829. QTVRSetEnteringNodeProc            (QTVRInstance             qtvr,
  830.                                  QTVREnteringNodeUPP     enteringNodeProc,
  831.                                  SInt32                 refCon,
  832.                                  UInt32                 flags);
  833.  
  834. EXTERN_API_C( OSErr )
  835. QTVRSetLeavingNodeProc            (QTVRInstance             qtvr,
  836.                                  QTVRLeavingNodeUPP     leavingNodeProc,
  837.                                  SInt32                 refCon,
  838.                                  UInt32                 flags);
  839.  
  840. EXTERN_API_C( OSErr )
  841. QTVRSetInteractionProperty        (QTVRInstance             qtvr,
  842.                                  UInt32                 property,
  843.                                  void *                    value);
  844.  
  845. EXTERN_API_C( OSErr )
  846. QTVRGetInteractionProperty        (QTVRInstance             qtvr,
  847.                                  UInt32                 property,
  848.                                  void *                    value);
  849.  
  850. EXTERN_API_C( OSErr )
  851. QTVRReplaceCursor                (QTVRInstance             qtvr,
  852.                                  QTVRCursorRecord *        cursRecord);
  853.  
  854. /*
  855.   =================================================================================================
  856.     Viewing Limits and Constraints 
  857.   -------------------------------------------------------------------------------------------------
  858. */
  859.  
  860. EXTERN_API_C( OSErr )
  861. QTVRGetViewingLimits            (QTVRInstance             qtvr,
  862.                                  UInt16                 kind,
  863.                                  float *                minValue,
  864.                                  float *                maxValue);
  865.  
  866. EXTERN_API_C( UInt32 )
  867. QTVRGetConstraintStatus            (QTVRInstance             qtvr);
  868.  
  869. EXTERN_API_C( OSErr )
  870. QTVRGetConstraints                (QTVRInstance             qtvr,
  871.                                  UInt16                 kind,
  872.                                  float *                minValue,
  873.                                  float *                maxValue);
  874.  
  875. EXTERN_API_C( OSErr )
  876. QTVRSetConstraints                (QTVRInstance             qtvr,
  877.                                  UInt16                 kind,
  878.                                  float                     minValue,
  879.                                  float                     maxValue);
  880.  
  881.  
  882. /*
  883.   =================================================================================================
  884.     Memory Management 
  885.   -------------------------------------------------------------------------------------------------
  886. */
  887.  
  888. EXTERN_API_C( OSErr )
  889. QTVRGetAvailableResolutions        (QTVRInstance             qtvr,
  890.                                  UInt16 *                resolutionsMask);
  891.  
  892. EXTERN_API_C( OSErr )
  893. QTVRGetCacheMemInfo                (QTVRInstance             qtvr,
  894.                                  UInt16                 resolution,
  895.                                  SInt16                 cacheDepth,
  896.                                  SInt32 *                minCacheBytes,
  897.                                  SInt32 *                suggestedCacheBytes,
  898.                                  SInt32 *                fullCacheBytes);
  899.  
  900. EXTERN_API_C( OSErr )
  901. QTVRGetCacheSettings            (QTVRInstance             qtvr,
  902.                                  UInt16 *                resolution,
  903.                                  SInt16 *                cacheDepth,
  904.                                  SInt16 *                cacheSize);
  905.  
  906. EXTERN_API_C( OSErr )
  907. QTVRSetCachePrefs                (QTVRInstance             qtvr,
  908.                                  UInt16                 resolution,
  909.                                  SInt16                 cacheDepth,
  910.                                  SInt16                 cacheSize);
  911.  
  912. /*
  913.   =================================================================================================
  914.     Buffer Access 
  915.   -------------------------------------------------------------------------------------------------
  916. */
  917.  
  918. EXTERN_API_C( OSErr )
  919. QTVRSetPrescreenImagingCompleteProc (QTVRInstance         qtvr,
  920.                                  QTVRImagingCompleteUPP  imagingCompleteProc,
  921.                                  SInt32                 refCon,
  922.                                  UInt32                 flags);
  923.  
  924. EXTERN_API_C( OSErr )
  925. QTVRSetBackBufferImagingProc    (QTVRInstance             qtvr,
  926.                                  QTVRBackBufferImagingUPP  backBufferImagingProc,
  927.                                  UInt16                 numAreas,
  928.                                  QTVRAreaOfInterest     areasOfInterest[],
  929.                                  SInt32                 refCon);
  930.  
  931. EXTERN_API_C( OSErr )
  932. QTVRRefreshBackBuffer            (QTVRInstance             qtvr,
  933.                                  UInt32                 flags);
  934.  
  935.  
  936.  
  937. /*
  938.   =================================================================================================
  939.     Old Names
  940.   -------------------------------------------------------------------------------------------------
  941. */
  942. #if OLDROUTINENAMES
  943. typedef QTVRCursorRecord                 CursorRecord;
  944. typedef QTVRAreaOfInterest                 AreaOfInterest;
  945. typedef QTVRFloatPoint                     FloatPoint;
  946. typedef QTVRLeavingNodeProcPtr             LeavingNodeProcPtr;
  947. typedef QTVRLeavingNodeUPP                 LeavingNodeUPP;
  948. typedef QTVREnteringNodeProcPtr         EnteringNodeProcPtr;
  949. typedef QTVREnteringNodeUPP             EnteringNodeUPP;
  950. typedef QTVRMouseOverHotSpotProcPtr     MouseOverHotSpotProcPtr;
  951. typedef QTVRMouseOverHotSpotUPP         MouseOverHotSpotUPP;
  952. typedef QTVRImagingCompleteProcPtr         ImagingCompleteProcPtr;
  953. typedef QTVRImagingCompleteUPP             ImagingCompleteUPP;
  954. typedef QTVRBackBufferImagingProcPtr     BackBufferImagingProcPtr;
  955. typedef QTVRBackBufferImagingUPP         BackBufferImagingUPP;
  956. #endif  /* OLDROUTINENAMES */
  957.  
  958.  
  959.  
  960. #if PRAGMA_STRUCT_ALIGN
  961.     #pragma options align=reset
  962. #elif PRAGMA_STRUCT_PACKPUSH
  963.     #pragma pack(pop)
  964. #elif PRAGMA_STRUCT_PACK
  965.     #pragma pack()
  966. #endif
  967.  
  968. #ifdef PRAGMA_IMPORT_OFF
  969. #pragma import off
  970. #elif PRAGMA_IMPORT
  971. #pragma import reset
  972. #endif
  973.  
  974. #ifdef __cplusplus
  975. }
  976. #endif
  977.  
  978. #endif /* __QUICKTIMEVR__ */
  979.  
  980.